import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../components/login.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: login
  },
  {
    path: '/employee',
    name: 'employee',
    component: () => import('../components/employee.vue'),
    children: [
      {
        path: '/employee/indent',
        name: 'indent',
        component: () => import('../views/employee/indent.vue'),
        children: [{
          path: '/employee/indent/Today Sorder',
          name: 'Today Sorder',
          component: () => import('../views/employee/Today Sorder.vue'),
          children: [{
            path: '/employee/indent/Today Sorder/OrderDetail',
            name: 'OrderDetail',
            component: () => import('../views/employee/OrderDetail.vue')
          }]
        },
        {
          path: '/employee/indent/HistoryOrder',
          name: 'HistoryOrder',
          component: () => import('../views/employee/HistoryOrder.vue')
        },
        {
          path: '/employee/indent/BookingOrder',
          name: 'BookingOrder',
          component: () => import('../views/employee/BookingOrder.vue')
        },
        {
          path: '/employee/indent/NumeralOrder',
          name: 'NumeralOrder',
          component: () => import('../views/employee/NumeralOrder.vue')
        }
        ]
      },
      {
        path: '/employee/system',
        name: 'system',
        component: () => import('../views/employee/system.vue'),
        children: [
          {
            path: '/employee/system/basic',
            name: 'basic',
            component: () => import('../views/employee/Basic.vue')
          },
          {
            path: '/employee/system/Personal',
            name: 'Personal',
            component: () => import('../views/employee/Personal.vue')
          }
        ]
      },
      {
        path: '/employee/FoodManage',
        name: 'FoodManage',
        component: () => import('../views/employee/FoodManage.vue')
      },
      {
        path: '/employee/Home',
        name: 'Home',
        component: () => import('../views/employee/Home.vue')
      },
      {
        path: '/employee/Order',
        name: 'Order',
        component: () => import('../views/employee/Order.vue')
      },
      {
        path: '/employee/Single',
        name: 'Single',
        component: () => import('../views/employee/Single.vue')
      },
      {
        path: '/employee/Table',
        name: 'Table',
        component: () => import('../views/employee/Table.vue')
      }
    ]
  },
  {
    path: '/manage',
    name: 'manage',
    component: () => import('../components/manage.vue'),
    children: [{
      path: '/manage/HomePage',
      name: 'HomePage',
      component: () => import('../views/manage/HomePage.vue')
    },
    {
      path: '/manage/Food',
      name: 'Food',
      component: () => import('../views/manage/Food.vue')
    },
    {
      path: '/manage/kucun',
      name: 'kucun',
      component: () => import('../views/manage/kucun.vue'),
      children: [
        {
          path: '/manage/kucun/FoodStock',
          name: 'FoodStock',
          component: () => import('../views/manage/FoodStock.vue')
        },
        {
          path: '/manage/kucun/StockTaking',
          name: 'StockTaking',
          component: () => import('../views/manage/StockTaking.vue')
        }
      ]
    },
    {
      path: '/manage/cuxiao',
      name: 'cuxiao',
      component: () => import('../views/manage/cuxiao.vue'),
      children: [
        {
          path: '/manage/cuxiao/Coupon',
          name: 'Coupon',
          component: () => import('../views/manage/Coupon.vue')
        },
        {
          path: '/manage/cuxiao/Product',
          name: 'Product',
          component: () => import('../views/manage/Product.vue')
        },
        {
          path: '/manage/cuxiao/Product',
          name: 'Product',
          component: () => import('../views/manage/Product.vue')
        }
      ]
    },
    {
      path: '/manage/indentd',
      name: 'indentd',
      component: () => import('../views/manage/Indentd.vue')
    },
    {
      path: '/manage/baobiao',
      name: 'baobiao',
      component: () => import('../views/manage/baobiao.vue'),
      children: [
        {
          path: '/manage/baobiao/FoodWater',
          name: 'FoodWater',
          component: () => import('../views/manage/FoodWater.vue')
        },
        {
          path: '/manage/baobiao/CashierWater',
          name: 'CashierWater',
          component: () => import('../views/manage/CashierWater.vue')
        },
        {
          path: '/manage/baobiao/RevenueReport',
          name: 'RevenueReport',
          component: () => import('../views/manage/RevenueReport.vue')
        },
        {
          path: '/manage/baobiao/SmallProgram',
          name: 'SmallProgram',
          component: () => import('../views/manage/SmallProgram.vue')
        }]
    },
    {
      path: '/manage/xitong',
      name: 'xitong',
      component: () => import('../views/manage/xitong.vue'),
      children: [
        {
          path: '/manage/xitong/mendian',
          name: 'mendian',
          component: () => import('../views/manage/mendian.vue'),
          children: [
            {
              path: '/manage/xitong/mendian/Worker',
              name: 'Worker',
              component: () => import('../views/manage/Worker.vue')
            },
            {
              path: '/manage/xitong/mendian/Store',
              name: 'Store',
              component: () => import('../views/manage/Store.vue')
            },
            {
              path: '/manage/xitong/mendian/LoginLog',
              name: 'LoginLog',
              component: () => import('../views/manage/LoginLog.vue')
            }]
        },
        {
          path: '/manage/xitong/tableList',
          name: 'tableList',
          component: () => import('../views/manage/TableList.vue')
        },
        {
          path: '/manage/xitong/CodeOrder',
          name: 'CodeOrder',
          component: () => import('../views/manage/CodeOrder.vue')
        },
        {
          path: '/manage/xitong/Pay',
          name: 'Pay',
          component: () => import('../views/manage/Pay.vue')
        }]
    }]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
